import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import message from '@/components/message'
import shopCar from '@/components/shopCar'
import setting from '@/components/setting'
import newList from '@/components/news/newList'
import newsinfo from '@/components/news/newsinfo'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/tabbar'
    },
    {
      path: '/tabbar',
      component: Home
    },
    {
      path: '/news/newsList',
      component: newList
    },
    {
      path: '/news/newsinfo/:id',
      component: newsinfo
    },
    {
      path: '/tabbar-with-chat',
      component: message
    },
    {
      path: '/tabbar-with-contact',
      component: shopCar
    },
    {
      path: '/tabbar-with-map',
      component: setting
    }
  ]
})
